﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MonthlyManage.aspx.cs" Inherits="Page_MonthlyManage" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <title></title>

    <link href="../Style/Css/Css.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" src="../Js/jquery.js"></script>

    <style type="text/css">
        * {
            margin: 0px;
            padding: 0px;
        }

        body {
            cursor: auto;
        }

        html {
            overflow: hidden;
        }

        #sideBar {
            width: 450px;
            overflow: hidden;
        }

        #main {
            overflow: auto;
        }

        #toggleBar, .div {
            width: 3px;
            height: 100%;
            overflow: hidden;
            background: #F1F6FC;
            cursor: e-resize;
            border-left: 1px solid #99BBE8;
            border-right: 1px solid #99BBE8;
        }

        td {
            display: block;
            overflow: auto;
            word-break: break-all;
        }

        #mainUD {
            overflow: auto;
        }

        #toggleBarUD, .divUD {
            height: 3px;
            width: 100%;
            overflow: hidden;
            background: #F1F6FC;
            cursor: n-resize;
            border-top: 1px solid #99BBE8;
            border-bottom: 1px solid #99BBE8;
        }
    </style>
    <script>
        var clickedItem;
        function openList(name) {
            document.getElementById('DetailFrame').src = 'MonthlyList2.aspx?ID=' + escape(name) + '&nc=' + Math.random();
        }
        $(document).ready(function () {
            $("#MainList > table >tbody >tr").click(function () {

                ClickChangeClass(this);

            }).mouseover(function () {

                OverChangeClass(this);
            }).mouseout(function () {

                ReturnClass(this);
            });


        });

        function OverChangeClass(obj) {
            if (obj.className != "Cur")
                obj.className = 'Over'
        }
        function ReturnClass(obj) {
            obj.className = obj.oldclass;
        }
        function ClickChangeClass(obj) {
            if (clickedItem != null) {
                clickedItem.className = 'Normal';
                clickedItem.oldclass = 'Normal';
            }
            clickedItem = obj;
            obj.className = 'Cur';
            obj.oldclass = 'Cur';
        }
    </script>
</head>
<body scroll="no">
    <form id="form1" runat="server">
        <table cellspacing="0" cellpadding="0" border="0" class="MainTable" width="100%"
            height="100%" style="">

            <tr>
                <td class="TitleBar" colspan="3">
                    <div class="MainTitle">科室周报管理 </div>
                    <div class="RightTool"></div>
                </td>
            </tr>
            <tr>
                <td width="1">
                    <div id="sideBar">
                        <table cellspacing="0" cellpadding="0" border="0" class="" width="100%" height="100%">

                            <tr>
                                <td class="ToolBar">
                                    <table cellspacing="0" cellpadding="0" border="0" width="100%">
                                    </table>
                                </td>
                            </tr>

                            <tr>
                                <td>
                                    <table border="0" cellspacing="0" cellpadding="0" width="100%">
                                        <tbody>
                                            <tr>
                                                <td>
                                                    <table class="PageGridHeader" border="0" cellspacing="0" cellpadding="0" width="100%">
                                                        <tbody>
                                                            <tr>
                                                                <td align="left">&nbsp;&nbsp;&nbsp;&nbsp;部门
                                                                </td>
                                                            </tr>
                                                        </tbody>
                                                    </table>
                                                </td>

                                            </tr>
                                        </tbody>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <div id="MainList" style="width: 100%; overflow: auto;" class="ScrollDiv">

                                        <table class="MainInfolist" border="0" cellspacing="0" cellpadding="0" width="100%">
                                            <tbody>
                                                <asp:Repeater runat="server" ID="rpDept">
                                                    <ItemTemplate>
                                                        <tr id="TableRow_<%# Container.ItemIndex%>" class="Normal" style="cursor: pointer" onclick="openList('<%#Eval("ID")%>')">
                                                            <td><a><%#Eval("DeptName") %> </a></td>
                                                        </tr>

                                                    </ItemTemplate>
                                                </asp:Repeater>

                                            </tbody>
                                        </table>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
                <td width="3" id="toggleBar"></td>
                <td id="main" valign="top">
                    <iframe frameborder="2" scrolling="no" width="100%" name="DetailFrame" id="DetailFrame"
                        src="" height="100%"></iframe>
                </td>
            </tr>
        </table>
        <script>
            function PageResize() {

                var height = document.body.clientHeight;
                var width = document.body.clientWidth;
                var mainList = document.getElementById("MainList");
                var sideBar = document.getElementById("sideBar");

                var main = document.getElementById("main");

                if (height > 99) {
                    mainList.style.height = (height - 84) + "px";
                    sideBar.style.height = (height - 28) + "px";
                    main.style.height = (height - 28) + "px";

                }
                if (document.getElementById("ctl00_TdForScroll") != null) {

                    if (mainList.clientHeight < mainList.scrollHeight)
                        document.getElementById("ctl00_TdForScroll").style.display = "";
                    else
                        document.getElementById("ctl00_TdForScroll").style.display = "none";
                }

            }
            function SwitchDefaultTableRow() {

                if (document.getElementById("TableRow_0") != null) {
                    document.getElementById("TableRow_0").click();
                }

            }

            PageResize();
            window.onresize = PageResize;
            SwitchDefaultTableRow();
        </script>

    </form>
</body>
</html>
